package cn.stylefeng.guns.sys.modular.dataShift.controller;


import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.dataQualityCheckDetail.model.params.QualityCheckDetailParam;
import cn.stylefeng.guns.sys.modular.dataShift.service.DataShiftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/dataShift")
public class DataShiftController {

    @Autowired
    DataShiftService dataShiftService;

    private String PREFIX = "/modular/dataShift/dataShift";

    /**
     * 跳转到主页面
     *
     * @author author
     * @Date 2020-11-19
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "/dataShift.html";
    }


    /**
     * 数据转换
     *
     * @author author
     * @Date 2020-11-20
     */
    @ResponseBody
    @RequestMapping("/dataShift")
    public int list(String metadataId) {
        return dataShiftService.dataShift(Integer.parseInt(metadataId));
    }
}
